<@Page title="Admin - Platforma E-prawojazdy" >
<style>
html, body {
}
</style>

	<script type="text/javascript">
		require(["dojo/parser", "dijit/form/Form", "dijit/form/Button", "dijit/form/ValidationTextBox"]);
	</script>

	<div id="errors">
		<#if (actionErrors?? && actionErrors?size > 0)>
			<#list actionErrors as error>
				<#if error?if_exists != "">
		            <div id="errorMsg">${error!}</div>
		        </#if>
			</#list>
		</#if>
	</div>

<div id="loginWindow">
	<#if (actionErrors?? && actionErrors?size > 0)>
		<script>
			require(["dojo/_base/fx", "dojo/on", "dojo/dom", "dojo/domReady!"], function(fx, on, dom) {
			      var fadeTarget = dom.byId("errors");
			     fx.animateProperty({ node: fadeTarget, duration:1000,
			        properties: {
			             paddingTop : {start:'0', end:'10', units:"px"},
			             paddingBottom : {start:'0', end:'10', units:"px"},
			             paddingLeft : {start:'0', end:'15', units:"px"},
			             paddingRight : {start:'0', end:'15', units:"px"},
			             width : {start:'50', end: '100', units : "%"}
			        }
			    }).play();
			 });
		</script>
	</#if>
	
		<div data-dojo-type="dijit/form/Form" id="loginForm" data-dojo-id="myForm" action="userLogin" method="post" >
		    <script type="dojo/on" data-dojo-event="submit">
		        if (!this.validate()) {
		            return false;
		        }
		        return true;
		    </script>
			<center>
				<h1>Administrator</h1>
				<label for="login">Login:</label>
				<input type="text" id="login" name="login" required="true" data-dojo-type="dijit/form/ValidationTextBox"/>
				<br/>
				<br/>
				<label for="password">Haslo:</label>
				<input type="password" id="password" name="password" required="true" data-dojo-type="dijit/form/ValidationTextBox"/>
			    <br/>
			    <br/>
			    <button data-dojo-type="dijit/form/Button" type="submit" >Zaloguj</button>
		    </center>
		</div>
</div>
</@Page>
